package com.yl.plugin.model;

import java.util.Objects;

/**
 * 分页对象
 *
 * @author:liuxubo
 * @date:2023/7/14 14:13
 */
public class Page {
    private Integer pageNum;
    private Integer pageSize;

    public Integer getPageNum() {
        return pageNum;
    }

    public void setPageNum(Integer pageNum) {
        this.pageNum = Objects.isNull(pageNum) ? 1 : (pageNum < 1 ? 1 : pageNum);
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = Objects.isNull(pageSize) ? 10 : (pageSize < 1 ? 0 : pageSize);
    }

}
